interface Default3DAxis {
  x: number;
  y: number;
  z: number;
}

export default function (from: Default3DAxis, to: Default3DAxis, subdivideCount = 2) {
  const x: number[] = [],
    y: number[] = [],
    z: number[] = [],
    list = [],
    lx = to.x - from.x,
    ly = to.y - from.y,
    lz = to.z - from.z;

  for (let i = 1; i <= subdivideCount; i++) {
    list.push(Math.log(((Math.E - 1) * i) / subdivideCount + 1));
  }
  // console.log(list);

  list.forEach((v, i) => {
    const r = (i + 1) / subdivideCount;
    x.push(from.x + (lx / r) * v);
    y.push(from.y + (ly / r) * v);
    z.push(from.z + (lz / r) * v);
  });
  // console.log(from, to);
  // console.log(list);

  console.log(x, y, z);

  return { x, y, z };
}
